package com.ate.javamvp.mvp.contract;

import com.ate.bean.GoodsBean;
import com.ate.bean.SearchBean;
import com.ate.bean.TuijianBean;
import com.ate.lib_core.http.mvp.model.BaseModel;
import com.ate.lib_core.http.mvp.model.Imodel;
import com.ate.lib_core.http.mvp.presenter.BasePresenter;
import com.ate.lib_core.http.mvp.view.Iview;
import com.google.gson.JsonObject;

import java.util.List;

import io.reactivex.Observable;
import okhttp3.RequestBody;

/**
 * @author Ate
 * @description:
 * @date :2020/12/11 10:03
 */
public interface Contract {
    interface DataXiaModel extends Imodel{
        Observable<TuijianBean> getTuijian();
        Observable<GoodsBean> getGoods();
        Observable<SearchBean> getSearch(String keyword , String type);
        Observable<JsonObject> login(RequestBody requestBody);
    }
     abstract class DataXiaPresenter extends BasePresenter<BaseModel,DataXiaView> {

        public DataXiaPresenter(DataXiaView mView) {
            super(mView);
        }

        public abstract void getGoods();
     }

    interface DataXiaView extends Iview{
        void onSuccess(List<GoodsBean.DataBean> data );
        void onFail();

        default void onSucc(List<SearchBean.DataBean> data) {

        }
        default void LoginSucce(JsonObject jsonObject){

        }

    }

}
